home *** CD-ROM | disk | FTP | other *** search
- Path: BIX.com!agurski
- From: agurski@BIX.com (agurski on BIX)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.msdos.programmer,comp.programming,comp.windows.ms.programmer
- Subject: Re: Date Arithmetic
- Date: 16 Feb 96 08:31:54 GMT
- Organization: Delphi Internet Services Corporation
- Message-ID: <agurski.824459514@BIX.com>
- References: <4g19kp$640@tracy.protocom.com>
- NNTP-Posting-Host: bix.com
-
- "Michael J. Karas" <mkaras@pclink.com> writes:
-
- >I am working on an algorithm for a laser marking machine that writes
- >expiration delays on to food product boxes. The algorithm needs to
- >be able to add NNN days to todays date in the fastest manner possible
- >without using any floating point arithmetic. I could use help from anyone
- >that has C code for doing this. It would be nice if the solution took the
- >leap year problem in to account including the special case of the year
- >2000. Thanks in advance to anyone who could share their knowledge on this
- >subject.
- >-----
- >Michael Karas | EMail: mkaras@pclink.com
- >Carousel Design Solutions | America OnLine: MJKaras
- >6021 Logan Avenue South | Voice: (612) 861-1284
- >Minneapolis MN 55419 | Fax: (612) 861-1386
- >-----
-
-
- -------------------------
- Check algorithm 199 "Conversion between calendar date and Julian day
- number" by Robert G. Tantzen in "Collected Algorithms from CACM",
- published by the ACM (Association for Computing Machines). The two
- routines there will do the trick for you.
-
- -- Aron
-